Search
Utilities.MeasureText Method
See Also
 






Measures the specified text when drawn with the specified font.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public static Size MeasureText (
    string text,
    FontFamily fontFamily,
    double fontSize,
    Nullable<Double> maxWidth = null
)

Visual Basic  Copy Code

Public Shared Function MeasureText( _
    text As String, _
    fontFamily As FontFamily, _
    fontSize As Double, _
    Optional maxWidth As Nullable(Of Double) = Nothing _
) As Size

 Parameters

text

The string to measure.

fontFamily

A FontFamily instance specifying the font.

fontSize

A double value specifying the font size.

maxWidth
Optional.

A double value specifying the maximum width for the text.

 Return Value

A Size instance representing the text size.

 See Also